import java.util.Scanner;

public class DAY0411 {
    public static int fun(String s,String t){
        int i=s.indexOf(t);
        int sum=0;
        if(i==-1){
            return 0;
        }else{
            sum=1+fun(s.substring(i+t.length()),t);
        }
        return sum;
    }
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        while (sc.hasNext()){
            String s=sc.next();
            String t=sc.next();

            int sum=fun(s,t);
            System.out.println(sum);
        }
    }



    public static void main1(String[] args){
        //1<=from<=to<=80
        //先存储1~80的斐波那契数
        long[] num=new long[80];
        num[0]=1;
        num[1]=1;
        for (int i = 2; i < num.length ; i++) {
            num[i]=num[i-1]+num[i-2];
        }
        //开始接受数据
        Scanner sc=new Scanner(System.in);
        while (sc.hasNextInt()){
            long sum=0;
            int from=sc.nextInt();
            int to=sc.nextInt();
            for (int i = from-1; i < to-1 ; i++) {
                sum=sum+num[i];
            }
            System.out.println(sum);
        }
    }

}
